package com.vf.admin.platform.service.impl;

import com.vf.admin.platform.dao.RoleMenuDao;
import com.vf.admin.platform.entity.RoleMenu;
import com.vf.admin.platform.service.RoleMenuService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RoleMenuServiceImpl  implements RoleMenuService {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private RoleMenuDao roleMenuDao;

    @Override
    public void saveOrUpdate(RoleMenu roleMenu) {
        roleMenuDao.saveOrUpdate(roleMenu);
    }

    @Override
    public RoleMenu get(Integer id) {
        return roleMenuDao.get(id);
    }

    @Override
    public List<RoleMenu> findList(Map<String, Object> paraMap) {
        return roleMenuDao.findList(paraMap);
    }

    @Override
    public void save(List<RoleMenu> roleMenuList) {
        roleMenuDao.save(roleMenuList);
    }

    @Override
    public void delByMenuId(int menuid) {
        roleMenuDao.delByMenuId(menuid);
    }

    @Override
    public void delByRoleId(int roleid) {
        roleMenuDao.delByRoleId(roleid);
    }
}
